| Conditions | 2 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | 'use strict' |
||
| 15 | Module.getManifest = function (callback, basePath) { |
||
| 16 | var modulePath = basePath ? path.join(basePath, 'module.json') : 'module.json' |
||
| 17 | jsonfile.readFile(modulePath, function (err, module) { |
||
| 18 | if (err) { |
||
| 19 | output.err('Error reading module.json: ' + err) |
||
| 20 | return |
||
| 21 | } |
||
| 22 | if (!('slug' in module) || !module.slug || typeof module.slug !== 'string' || !module.slug.length) { |
||
| 23 | output.err('Please set a valid value for module.slug') |
||
| 24 | return |
||
| 25 | } |
||
| 26 | |||
| 27 | callback(createManifest(module)) |
||
| 28 | }) |
||
| 29 | } |
||
| 30 | |||
| 32 |